let state = {
    userData: []
}
let mutations = {
    SET_CREATE_TIME(state, item) {
        let userItem = {
            ...item
        }
        // 30分钟后过期
        userItem.endTime = (userItem.createTime + 1800000)
        state.userData.push(userItem)
        console.log('已存入store', state.userData);
    },
}
const actions = {
    setTime({
        state,
        commit
    }, time) {
        commit('SET_CREATE_TIME', timeData)
    },
}
const getters = {
    getTime: (state) => ({
        orderId,
        uid
    }) => {
        console.log(orderId);
        return state.userData.find(item => item.orderId === orderId)
    }
}
export default {
    state,
    mutations,
    actions,
    getters
}